home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Control Panel Hide 1.xpl < prev    next >
Text File  |  2003-11-27  |  4KB  |  112 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="9"
  3. "COUNT"="1"
  4. "UIPATH 1"="Appearance\Control Panel\Visible Icons"
  5. "NAME"="Visible System Icons #1"
  6. "VERSION"="3.01"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Display "" applet"
  9. "DESCRIPTION 1"="This plug-in can be used to hide or show the different applets inside Start -> Settings -> Control Panel."
  10. "DESCRIPTION 2"="Not all of these options will be available on every system.  Availability depends upon the software installed on your system."
  11. "DESCRIPTION 3"="NOTE #1: Hiding the "Internet Control Panel" applet will also hide the "Users" applet on Windows 9x systems."
  12. "DESCRIPTION 4"="NOTE #2: Hiding the "System Properties" applet also hides the "Add/Remove Hardware" applet on Windows 9x/ME systems."
  13. "DESCRIPTION 5"="NOTE #3: Hiding the "Mouse Control" applet also hides the "Keyboard","Fonts" and "Printers" applets on Windows 9x/ME systems."
  14. "AUTHOR"="Xteq Systems (CptSiskoX)"
  15. "CONTACTURL"="http://www.xteq.com"
  16. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  17. "COMMENT 1"="See also: MS KB Q207750"
  18. "COMMENT 2"="Special thanks to Maxwell (maxwello@hotpop.com) for his brilliant tips and CptSiskoX (CptSiskoX@flashmail.com) for his help."
  19. "COMMENT 3"="Thanks to JMRParbold@aol.com for the "multimedia and sounds" applet fix!"
  20.  
  21.  
  22. '******************************************************************
  23. '***                ONLY CHANGE LINES BELOW                    ****
  24. '******************************************************************
  25.  
  26. aryDesc=Array("System Properties","Display Properties","Add/Remove Programs","Internet Control Panel","Network Properties","Game Controllers / Joysticks","Modem","Telephony","Passwords Properties","Time and Date","Regional Options","Email","ODBC","Power Management","Mouse Control","DirectX","Scanner and Camera Properties","Desktop Themes","Accessibility Options","Add/Remove Hardware","Fax","Multimedia","Sounds","Infrared","HSP Modem")
  27. aryCPLs=Array("sysdm.cpl","desk.cpl","appwiz.cpl","Inetcpl.cpl","netcpl.cpl","joy.cpl","modem.cpl","telephon.cpl","password.cpl","timedate.cpl","intl.cpl","mlcfg32.cpl","odbccp32.cpl","powercfg.cpl","main.cpl","directx.cpl","sticpl.cpl","themes.cpl","access.cpl","hdwwiz.cpl","fax.cpl","mmsys.cpl","mmsys.cpl sounds","infrared.cpl","ptctrl.cpl") 
  28.  
  29. '******************************************************************
  30. sPath="HKCU\Control Panel\Don't Load\"
  31. sFile="CONTROL.INI"
  32. sFileSec="Don't Load"
  33.  
  34.  
  35.  
  36. SUB Plugin_Initialize
  37.  for i=0 to UBound(aryCPLs)
  38.      Call ReadIt(i+1,aryCPLs(i),aryDesc(i)) 
  39.  next 
  40. END SUB
  41.  
  42. Sub ReadIt(ItemNumber,VAL,Desc)
  43.   Call SetUIElement(ItemNumber,"Show '" & Desc & "' applet")
  44.  
  45.   If GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then
  46.      'old (win32 1/2) INI style...
  47.      s=IniReadValue(sFile,sFileSec,VAL)
  48.      if len(s)>0 then
  49.         Call SetUIElementEx(ItemNumber,false)
  50.      else
  51.         Call SetUIElementEx(ItemNumber,true)
  52.      end if   
  53.   else
  54.      s=RegReadValue(sPath & VAL)
  55.      if IsEmpty(s)=false then
  56.         Call SetUIElementEx(ItemNumber,false)
  57.      else
  58.         Call SetUIElementEx(ItemNumber,true)
  59.      end if
  60.   end if
  61.  
  62. End Sub
  63.  
  64. 'Called when the Plugin should validate the Data the user has entered
  65. SUB Plugin_CheckData(ElementIndex)
  66. END SUB
  67.  
  68. 'Called when the Plugin should apply the changes
  69. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  70.  for i=0 to UBound(aryCPLs)
  71.      Call WriteIt(i+1,aryCPLs(i)) 
  72.  next 
  73.  
  74.  Call IndicateSettingChange()
  75. END SUB
  76.  
  77.  
  78. Sub WriteIt(ITM,VAL)
  79.  b=GetUIElementEx(ITM)
  80.  if b=true then
  81.     'Display it
  82.  
  83.     If GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then
  84.        'win32 1/2
  85.        Call IniWriteValue(sFile,sFileSec,VAL,"")
  86.     else
  87.        s=RegReadValue(sPath & VAL)
  88.        if IsEmpty(s)=false then
  89.           Call RegDeleteValue(sPath & VAL)
  90.        end if
  91.     end if
  92.  
  93.  else
  94.    'Hide it
  95.    
  96.    If GetWinVer=1 or GetWinVer=3 or GetWinVer=5 then
  97.       'win32 1/2
  98.       Call IniWriteValue(sFile,sFileSec,VAL,"no")
  99.    else
  100.       Call RegWriteValue(sPath & VAL,"1",1) 
  101.    end if
  102.  
  103.  end if   
  104. End Sub
  105.  
  106.  
  107. 'Called when the Plugin is about to be removed from memory
  108. SUB Plugin_Terminate
  109. END SUB
  110.  
  111.  
  112.